package com.waves.task.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.waves.core.web.domain.entities.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 任务表;
 *
 * @author : dlw
 * @date : 2024-9-18
 */
@TableName("task")
@Data
@Accessors(chain = true)
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private long id;
    /**
     * 标题
     */
    private String title;
    /**
     * 描述
     */
    private String description;
    /**
     * 内容
     */
    private String content;
    /**
     * 截止日期
     */
    private Long endTime;
    /**
     * 任务类型（0普通贴1任务贴2求助贴10征召贴）
     * @see com.waves.task.domain.enums.TaskTypeEnum
     */
    private Integer type;

    /**
     * 目标 0线上1线下
     */
    private Integer Target;


    /**
     * 帖子拥有人id
     */
    private Long userId;

    /**
     * 用户头像
     */
    private String userAvatar;

    /**
     * 赏金金额
     */
    private Double bounty;

    /**
     * 赏金数量
     */
    private Integer bountyNum;

    /**
     * 求助金额
     */
    private Double helpBounty;

    /**
     * 求助数量
     */
    private Integer helpBountyNum;

    /**
     * 点赞数
     */
    private Long likedNum;

    /**
     * 收藏数
     */
    private Long collectedNum;

    /**
     * 图片地址
     */
    private String imgUrl;

    /**
     * 任务状态 0未开始1已开始2已完成3已结束
     * @see com.waves.task.domain.enums.TaskReceiveStatusEnum
     */
    private Integer status;

    /**
     * 0信号量方式 1lua脚本 2 原子类方式 3RLock锁
     */
    private Integer level;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private Long createdBy;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Long createdTime;

    @TableField(value = "created_name", fill = FieldFill.INSERT)
    private String createdName;

    @TableField(value = "updated_by")
    private Long updatedBy;

    @TableField(value = "updated_time")
    private Long updatedTime;

    @TableField(value = "updated_name")
    private String updatedName;

    @TableField("del_flag")
    @TableLogic(delval = "id")
    private Integer delFlag;

}